var bannerswiper = require("../module/banners/bannerswiper.js"),
    goToTop = require("../module/gotop/gotop");

var Home = function() {
    this.options = {};
    this.redianM = null, this.redianC = null;
};

/**
 * 初始化
 * @param options Object 参数传递
 */
Home.prototype.init = function(options) {
    $.extend(this.options, options);
    this.initbannerswiper();
    this.initgoToTop();
}


/**
 * bannerswiper
 */
Home.prototype.initbannerswiper = function() {
    bannerswiper.init();
};
/**
 * gototop
 */
Home.prototype.initgoToTop = function() {
    goToTop.init({
        divContainerId: "#sidebar-nav",
        time: 500
    });
};


var instance;

module.exports = {
    'getInstance': function(options) {
        return instance || (instance = new Home(options));
    }
};